<template>
 <view class="register">
	 <view class="nav d_f j_c_c a_i_c">
	 	<view class="text">User Agreement</view>
	 	<image src="../../static/ct_0031_返回键.png" mode="" class="right" @tap="back"></image>
	 </view>
	 <image src="../../static/ct_0012_绿色顶.png" mode="" class="header"></image>
 	<view class="html">
 		<mp-html :content="html" />
 	</view>
 	</view>
</template>

<script>
 export default {
   data () {
     return {
       html:''
     }
   },
   components: {

   },
   methods: {
     getData(type){
		 this.$api.agreeOn({type:type}).then(res=>{
			 this.html=res.data.content
		 })
	 },
	 back() {
	 	uni.navigateBack({
	 		delta: 1
	 	});
	 }
   },
   onShow() {

   },
   onLoad(options) {
	   uni.setNavigationBarTitle({
	   	title: options.name
	   });
     this.getData(options.type)
   },
   watch: {

   },
   computed: {

   }
 }
</script>

<style scoped lang='scss'>
.register {
		width: 100%;
		height: 100%;
		background: #F2F4F5;
    .content{
		margin-top: 52rpx;
	}
	.nav {
		width: calc(100% - 64rpx);
		height: 160rpx;
		margin-left: 32rpx;
		position: relative;
		z-index: 9999;
	
		.text {
			font-size: 32rpx;
			font-weight: 700;
			color: #FFFFFF;
		}
	
		.right {
			width: 20rpx;
			height: 32rpx;
			position: absolute;
			left: 0rpx;
			z-index: 999;
			transform: rotate(180deg);
		}
	}
	
	.header {
		position: absolute;
		top: 0rpx;
		width: 100%;
		height: 229rpx;
		z-index: 1;
	}
	.html{
		height: 100%;
		overflow-y: auto;
		padding: 20rpx 30rpx;
		margin-top: 20px;
	}	

	

	}
</style>